<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DomainModel.Entities.Event>" %>
<!--Google map starts here-->
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

<script type="text/javascript">
    //<![CDATA[
    $(document).ready(function() {

        singlePoint();

    });

    function singlePoint() {
    
        // Creating a LatLng object containing the coordinate for the center of the map  
         var myLatlng = new google.maps.LatLng(<%= Convert.ToString(Model.Latitude, CultureInfo.InvariantCulture) %>, <%= Convert.ToString(Model.Longitude, CultureInfo.InvariantCulture) %>);
         var myTitle = "<%= Html.Encode(Model.Title) %>";
      
         // Creating an object literal containing the properties we want to pass to the map  
         var options = {
             center: myLatlng,
             zoom: 15,
             scrollwheel: false,
             mapTypeId: google.maps.MapTypeId.ROADMAP,
             mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
             navigationControlOptions: { style: google.maps.NavigationControlStyle.SMALL }
         };
         // Calling the constructor, thereby initializing the map  
         var map = new google.maps.Map(document.getElementById('map_canvas_events'), options);

         // Creating a marker
         var marker = new google.maps.Marker({
         position: myLatlng,
             map: map,
             title: myTitle
         });
    }
    
    //]]>
</script>


<div id="map_canvas_events">
</div>
<!--Google map ends here-->
